﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TFSBugTracking;
using System.Diagnostics;

namespace TFSTest.TFSBugTracking
{
    [TestClass]
    public class CryptTest
    {
        [TestMethod]
        public void EncryptDecrptTest()
        {
            string encryptedText = "Confidential plain text.".Encrypt("SecretKey");

            Assert.AreNotEqual("Confidential plain text.",encryptedText);
            Assert.AreEqual("Confidential plain text.",encryptedText.Decrypt("SecretKey"));   
        }

        [TestMethod]
        public void PasswordTest()
        {
            string encryptedText = "sdsdsd".Encrypt("zjdau");

            
            Trace.WriteLine(encryptedText);

            string decryptedText = encryptedText.Decrypt("zjdau");

            Trace.WriteLine(decryptedText);

            Assert.AreEqual("sdsdsd",decryptedText);
        }
    }
}
